# Test-Buffer makefile

SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:.cpp=.o)
INCS = $(wildcard *.h)

TARGET = test-buffer

CXXFLAGS = -O2 -Wall -c -I../UnitTest++/src
LDFLAGS  =
LIBS     = -L../UnitTest++ -L../Buffer -lUnitTest++ -lBuffer

%.o: %.cpp
	$(CXX) $(CXXFLAGS) $< -o $@

$(TARGET): $(OBJS)
	$(CXX) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)

debug: CXX += -DDEBUG -g
debug: all

release: all

all: $(TARGET)

.PHONY: clean
clean:
	rm -f $(OBJS) $(TARGET)
